#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
	char buf[100] = { 0 };
	int i = 0;
	int count1 = 0;
	int count2 = 0;
	while (buf[i] != '0')
	{
		if (buf[i] == 'A')
			count1++;
		if (buf[i] == 'B')
			count2++;
		i++;
	}
	if (count1 > count2)
		printf("A\n");
	else if (count2 > count1)
		printf("B\n");
	else
		printf("E\n");
	return 0;
}